/*0GI1xcoeligdpMeXoHBphnunOJ2g4dCU5YFZD890LI7V37gyxNxxDOEAL2M5cs25*/
import { tableId, dataSource, formId } from '../constants';
import { innerButton } from '../../../../public/components/pubUtils/buttonName.js';
import { copyInner, deleteInner, pasteInner } from '../../../../public/components/pubUtils/billPubUtil.js';
import { cardBodyControl } from '../../../../public/components/pubUtils/buttonvisible.js';

export default function (props, key, text, record, index,that) {
    switch (key) {
        // 表格操修改
        case innerButton.open_browse:
            props.cardTable.toggleRowView(tableId, record);
            break;
        case innerButton.Close_browse:
            props.cardTable.toggleRowView(tableId, record);
            break;
        case innerButton.open_edit:
            props.cardTable.openModel(tableId, 'edit', record, index);
            break;
        case innerButton.Copy_inner://复制行
            copyInner(record, dataSource, that);
            that.setState({
                buttonfalg: false
            }, () => {
                cardBodyControl(props, that.state.buttonfalg);
            })
            break;
        case innerButton.Delete_inner://删行
            deleteInner(that, props, tableId, index);
            //删行之后控制肩部按钮
            that.onSelected();
            break;
        case innerButton.Paste_inner://粘贴至此
            pasteInner(that, props, dataSource, tableId, index)
            break;
        default:
            break;
    }
};

/*0GI1xcoeligdpMeXoHBphnunOJ2g4dCU5YFZD890LI7V37gyxNxxDOEAL2M5cs25*/